Repository navigation
fix: exports without a path never overwrite an earlier export - #28
Merged
Merged
Conversation
An export with no path went to the Exports folder under the deck title, so exporting the same deck again replaced the earlier file. Each such export now takes the next free name (Title.pptx, Title (2).pptx, ...), claimed with a hard link or an exclusive create so concurrent exports never share a name, and the answer carries the served url of the new file. The deck export route and the export_deck agent tool follow the same rule. A path the person chose is still replaced whole.
A deck title with a leading dash or dot, or a run of dots, gave an Exports file name that /api/exports refuses, so the url in the answer did not answer. write_new now tidies the name before claiming it, so every route that writes a new export hands out a url that is served. On a disk without hard links, a failed move over the empty claim now removes the claim, so a failed write leaves no file behind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests
How to ship